
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>3.1 通用约定 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="字体排印.html" />
    
    
    <link rel="prev" href="CSS.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../基本原则.html">
            
                <a href="../基本原则.html">
            
                    
                    1. 基本原则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../html/HTML.html">
            
                <a href="../html/HTML.html">
            
                    
                    2. HTML
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../html/通用约定.html">
            
                <a href="../html/通用约定.html">
            
                    
                    2.1 通用约定
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../html/语义化.html">
            
                <a href="../html/语义化.html">
            
                    
                    2.2 语义化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../html/HEAD.html">
            
                <a href="../html/HEAD.html">
            
                    
                    2.3 HEAD
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="CSS.html">
            
                <a href="CSS.html">
            
                    
                    3. CSS
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.4.1" data-path="通用约定.html">
            
                <a href="通用约定.html">
            
                    
                    3.1 通用约定
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="字体排印.html">
            
                <a href="字体排印.html">
            
                    
                    3.2 字体排印
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="模块组织.html">
            
                <a href="模块组织.html">
            
                    
                    3.3 模块组织
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="Less规范.html">
            
                <a href="Less规范.html">
            
                    
                    3.4 Less规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="性能优化.html">
            
                <a href="性能优化.html">
            
                    
                    3.5 性能优化
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../javascript/js.html">
            
                <a href="../javascript/js.html">
            
                    
                    4. JavaScript
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../javascript/通用约定.html">
            
                <a href="../javascript/通用约定.html">
            
                    
                    4.1. 通用约定
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../javascript/jq.md">
            
                <span>
            
                    
                    4.2. jQuery 规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../javascript/性能优化.md">
            
                <span>
            
                    
                    4.3. 性能优化
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../">
            
                <a href="../">
            
                    
                    5. 移动端优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../">
            
                <a href="../">
            
                    
                    6. 工具箱
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../">
            
                <a href="../">
            
                    
                    7. 参考
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >3.1 通用约定</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h3 id="31-&#x901A;&#x7528;&#x7EA6;&#x5B9A;">3.1 &#x901A;&#x7528;&#x7EA6;&#x5B9A;</h3>
<hr>
<p><strong>&#x4EE3;&#x7801;&#x7EC4;&#x7EC7;</strong></p>
<ul>
<li>&#x4EE5;&#x7EC4;&#x4EF6;&#x4E3A;&#x5355;&#x4F4D;&#x7EC4;&#x7EC7;&#x4EE3;&#x7801;&#x6BB5;&#xFF1B;</li>
<li>&#x5236;&#x5B9A;&#x4E00;&#x81F4;&#x7684;&#x6CE8;&#x91CA;&#x89C4;&#x8303;&#xFF1B;</li>
<li>&#x7EC4;&#x4EF6;&#x5757;&#x548C;&#x5B50;&#x7EC4;&#x4EF6;&#x5757;&#x4EE5;&#x53CA;&#x58F0;&#x660E;&#x5757;&#x4E4B;&#x95F4;&#x4F7F;&#x7528;&#x4E00;&#x7A7A;&#x884C;&#x5206;&#x9694;&#xFF0C;&#x5B50;&#x7EC4;&#x4EF6;&#x5757;&#x4E4B;&#x95F4;&#x4E09;&#x7A7A;&#x884C;&#x5206;&#x9694;&#xFF1B;</li>
<li>&#x5982;&#x679C;&#x4F7F;&#x7528;&#x4E86;&#x591A;&#x4E2A; CSS &#x6587;&#x4EF6;&#xFF0C;&#x5C06;&#x5176;&#x6309;&#x7167;&#x7EC4;&#x4EF6;&#x800C;&#x975E;&#x9875;&#x9762;&#x7684;&#x5F62;&#x5F0F;&#x5206;&#x62C6;&#xFF0C;&#x56E0;&#x4E3A;&#x9875;&#x9762;&#x4F1A;&#x88AB;&#x91CD;&#x7EC4;&#xFF0C;&#x800C;&#x7EC4;&#x4EF6;&#x53EA;&#x4F1A;&#x88AB;&#x79FB;&#x52A8;&#xFF1B;</li>
</ul>
<p>&#x826F;&#x597D;&#x7684;&#x6CE8;&#x91CA;&#x662F;&#x975E;&#x5E38;&#x91CD;&#x8981;&#x7684;&#x3002;&#x8BF7;&#x7559;&#x51FA;&#x65F6;&#x95F4;&#x6765;&#x63CF;&#x8FF0;&#x7EC4;&#x4EF6;&#xFF08;component&#xFF09;&#x7684;&#x5DE5;&#x4F5C;&#x65B9;&#x5F0F;&#x3001;&#x5C40;&#x9650;&#x6027;&#x548C;&#x6784;&#x5EFA;&#x5B83;&#x4EEC;&#x7684;&#x65B9;&#x6CD5;&#x3002;&#x4E0D;&#x8981;&#x8BA9;&#x4F60;&#x7684;&#x56E2;&#x961F;&#x5176;&#x5B83;&#x6210;&#x5458; &#x6765;&#x731C;&#x6D4B;&#x4E00;&#x6BB5;&#x4E0D;&#x901A;&#x7528;&#x6216;&#x4E0D;&#x660E;&#x663E;&#x7684;&#x4EE3;&#x7801;&#x7684;&#x76EE;&#x7684;&#x3002;</p>
<p>&#x63D0;&#x793A;&#xFF1A;&#x901A;&#x8FC7;&#x914D;&#x7F6E;&#x7F16;&#x8F91;&#x5668;&#xFF0C;&#x53EF;&#x4EE5;&#x63D0;&#x4F9B;&#x5FEB;&#x6377;&#x952E;&#x6765;&#x8F93;&#x51FA;&#x4E00;&#x81F4;&#x8BA4;&#x53EF;&#x7684;&#x6CE8;&#x91CA;&#x6A21;&#x5F0F;&#x3002;</p>
<pre><code>/* ==========================================================================
   &#x7EC4;&#x4EF6;&#x5757;
 ============================================================================ */

/* &#x5B50;&#x7EC4;&#x4EF6;&#x5757;
 ============================================================================ */
.selector {
  padding: 15px;
  margin-bottom: 15px;
}

/* &#x5B50;&#x7EC4;&#x4EF6;&#x5757;
 ============================================================================ */
.selector-secondary {
  display: block; /* &#x6CE8;&#x91CA;*/
}

.selector-three {
  display: span;
}
</code></pre><p><strong>Class &#x548C; ID</strong></p>
<ul>
<li>&#x4F7F;&#x7528;&#x8BED;&#x4E49;&#x5316;&#x3001;&#x901A;&#x7528;&#x7684;&#x547D;&#x540D;&#x65B9;&#x5F0F;&#xFF1B;</li>
<li>&#x4F7F;&#x7528;&#x8FDE;&#x5B57;&#x7B26; - &#x4F5C;&#x4E3A; ID&#x3001;Class &#x540D;&#x79F0;&#x754C;&#x5B9A;&#x7B26;&#xFF0C;&#x4E0D;&#x8981;&#x9A7C;&#x5CF0;&#x547D;&#x540D;&#x6CD5;&#x548C;&#x4E0B;&#x5212;&#x7EBF;&#xFF1B;</li>
<li>&#x907F;&#x514D;&#x9009;&#x62E9;&#x5668;&#x5D4C;&#x5957;&#x5C42;&#x7EA7;&#x8FC7;&#x591A;&#xFF0C;&#x5C3D;&#x91CF;&#x5C11;&#x4E8E; 3 &#x7EA7;&#xFF1B;</li>
<li>&#x907F;&#x514D;&#x9009;&#x62E9;&#x5668;&#x548C; Class&#x3001;ID &#x53E0;&#x52A0;&#x4F7F;&#x7528;&#xFF1B;</li>
</ul>
<p>&#x51FA;&#x4E8E;<a href="http://www.stevesouders.com/blog/2009/06/18/simplifying-css-selectors/" title="&#x6027;&#x80FD;&#x8003;&#x91CF;" target="_blank">&#x6027;&#x80FD;&#x8003;&#x91CF;</a>&#xFF0C;&#x5728;&#x6CA1;&#x6709;&#x5FC5;&#x8981;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x907F;&#x514D;&#x5143;&#x7D20;&#x9009;&#x62E9;&#x5668;&#x53E0;&#x52A0; Class&#x3001;ID &#x4F7F;&#x7528;&#x3002;</p>
<p>&#x5143;&#x7D20;&#x9009;&#x62E9;&#x5668;&#x548C; ID&#x3001;Class &#x6DF7;&#x5408;&#x4F7F;&#x7528;&#x4E5F;&#x8FDD;&#x53CD;&#x5173;&#x6CE8;&#x5206;&#x79BB;&#x539F;&#x5219;&#x3002;&#x5982;&#x679C;HTML&#x6807;&#x7B7E;&#x4FEE;&#x6539;&#x4E86;&#xFF0C;&#x5C31;&#x8981;&#x518D;&#x53BB;&#x4FEE;&#x6539; CSS &#x4EE3;&#x7801;&#xFF0C;&#x4E0D;&#x5229;&#x4E8E;&#x540E;&#x671F;&#x7EF4;&#x62A4;&#x3002;</p>
<pre><code>/* Not recommended */
.red {}
.box_green {}
.page .header .login #username input {}
ul#example {}

/* Recommended */
#nav {}
.box-video {}
#username input {}
#example {}
</code></pre><p><strong>&#x58F0;&#x660E;&#x5757;&#x683C;&#x5F0F;</strong></p>
<ul>
<li>&#x9009;&#x62E9;&#x5668;&#x5206;&#x7EC4;&#x65F6;&#xFF0C;&#x4FDD;&#x6301;&#x72EC;&#x7ACB;&#x7684;&#x9009;&#x62E9;&#x5668;&#x5360;&#x7528;&#x4E00;&#x884C;&#xFF1B;</li>
<li>&#x58F0;&#x660E;&#x5757;&#x7684;&#x5DE6;&#x62EC;&#x53F7; { &#x524D;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A;&#x7A7A;&#x683C;&#xFF1B;</li>
<li>&#x58F0;&#x660E;&#x5757;&#x7684;&#x53F3;&#x62EC;&#x53F7; } &#x5E94;&#x5355;&#x72EC;&#x6210;&#x884C;&#xFF1B;</li>
<li>&#x58F0;&#x660E;&#x8BED;&#x53E5;&#x4E2D;&#x7684; : &#x540E;&#x5E94;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A;&#x7A7A;&#x683C;&#xFF1B;</li>
<li>&#x58F0;&#x660E;&#x8BED;&#x53E5;&#x5E94;&#x4EE5;&#x5206;&#x53F7; ; &#x7ED3;&#x5C3E;&#xFF1B;</li>
<li>&#x4E00;&#x822C;&#x4EE5;&#x9017;&#x53F7;&#x5206;&#x9694;&#x7684;&#x5C5E;&#x6027;&#x503C;&#xFF0C;&#x6BCF;&#x4E2A;&#x9017;&#x53F7;&#x540E;&#x5E94;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A;&#x7A7A;&#x683C;&#xFF1B;</li>
<li>rgb()&#x3001;rgba()&#x3001;hsl()&#x3001;hsla() &#x6216; rect() &#x62EC;&#x53F7;&#x5185;&#x7684;&#x503C;&#xFF0C;&#x9017;&#x53F7;&#x5206;&#x9694;&#xFF0C;&#x4F46;&#x9017;&#x53F7;&#x540E;&#x4E0D;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A;&#x7A7A;&#x683C;&#xFF1B;</li>
<li>&#x5BF9;&#x4E8E;&#x5C5E;&#x6027;&#x503C;&#x6216;&#x989C;&#x8272;&#x53C2;&#x6570;&#xFF0C;&#x7701;&#x7565;&#x5C0F;&#x4E8E; 1 &#x7684;&#x5C0F;&#x6570;&#x524D;&#x9762;&#x7684; 0 &#xFF08;&#x4F8B;&#x5982;&#xFF0C;.5 &#x4EE3;&#x66FF; 0.5&#xFF1B;-.5px &#x4EE3;&#x66FF;-0.5px&#xFF09;&#xFF1B;</li>
<li>&#x5341;&#x516D;&#x8FDB;&#x5236;&#x503C;&#x5E94;&#x8BE5;&#x5168;&#x90E8;&#x5C0F;&#x5199;&#x548C;&#x5C3D;&#x91CF;&#x7B80;&#x5199;&#xFF0C;&#x4F8B;&#x5982;&#xFF0C;#fff &#x4EE3;&#x66FF; #ffffff&#xFF1B;</li>
<li>&#x907F;&#x514D;&#x4E3A; 0 &#x503C;&#x6307;&#x5B9A;&#x5355;&#x4F4D;&#xFF0C;&#x4F8B;&#x5982;&#xFF0C;&#x7528; margin: 0; &#x4EE3;&#x66FF; margin: 0px;&#xFF1B;</li>
</ul>
<pre><code>/*  Not recommended  */
.selector, .selector-secondary, .selector[type=text] {
  padding:15px;
  margin:0px 0px 15px;
  background-color:rgba(0, 0, 0, 0.5);
  box-shadow:0px 1px 2px #CCC,inset 0 1px 0 #FFFFFF
}

/* Recommended */
.selector,
.selector-secondary,
.selector[type=&quot;text&quot;] {
  padding: 15px;
  margin-bottom: 15px;
  background-color: rgba(0,0,0,.5);
  box-shadow: 0 1px 2px #ccc, inset 0 1px 0 #fff;
}
</code></pre><p><strong>&#x58F0;&#x660E;&#x987A;&#x5E8F;</strong></p>
<p>&#x76F8;&#x5173;&#x5C5E;&#x6027;&#x5E94;&#x4E3A;&#x4E00;&#x7EC4;&#xFF0C;&#x63A8;&#x8350;&#x7684;&#x6837;&#x5F0F;&#x7F16;&#x5199;&#x987A;&#x5E8F;</p>
<ol>
<li>Positioning</li>
<li>Box model</li>
<li>Typographic</li>
<li>Visual</li>
</ol>
<p>&#x7531;&#x4E8E;&#x5B9A;&#x4F4D;&#xFF08;positioning&#xFF09;&#x53EF;&#x4EE5;&#x4ECE;&#x6B63;&#x5E38;&#x7684;&#x6587;&#x6863;&#x6D41;&#x4E2D;&#x79FB;&#x9664;&#x5143;&#x7D20;&#xFF0C;&#x5E76;&#x4E14;&#x8FD8;&#x80FD;&#x8986;&#x76D6;&#x76D2;&#x6A21;&#x578B;&#xFF08;box model&#xFF09;&#x76F8;&#x5173;&#x7684;&#x6837;&#x5F0F;&#xFF0C;&#x56E0;&#x6B64;&#x6392;&#x5728;&#x9996;&#x4F4D;&#x3002;&#x76D2;&#x6A21;&#x578B;&#x51B3;&#x5B9A;&#x4E86;&#x7EC4;&#x4EF6;&#x7684;&#x5C3A;&#x5BF8;&#x548C;&#x4F4D;&#x7F6E;&#xFF0C;&#x56E0;&#x6B64;&#x6392;&#x5728;&#x7B2C;&#x4E8C;&#x4F4D;&#x3002;</p>
<p>&#x5176;&#x4ED6;&#x5C5E;&#x6027;&#x53EA;&#x662F;&#x5F71;&#x54CD;&#x7EC4;&#x4EF6;&#x7684;&#x5185;&#x90E8;&#xFF08;inside&#xFF09;&#x6216;&#x8005;&#x662F;&#x4E0D;&#x5F71;&#x54CD;&#x524D;&#x4E24;&#x7EC4;&#x5C5E;&#x6027;&#xFF0C;&#x56E0;&#x6B64;&#x6392;&#x5728;&#x540E;&#x9762;&#x3002;</p>
<pre><code>.declaration-order {
  /* Positioning */
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;

  /* Box model */
  display: block;
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  padding: 10px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  margin: 10px;
  float: right;
  overflow: hidden;

  /* Typographic */
  font: normal 13px &quot;Helvetica Neue&quot;, sans-serif;
  line-height: 1.5;
  text-align: center;

  /* Visual */
  background-color: #f5f5f5;
  color: #fff;
  opacity: .8;

  /* Other */
  cursor: pointer;
}
</code></pre><p><strong>&#x5F15;&#x53F7;&#x4F7F;&#x7528;</strong></p>
<p>url() &#x3001;&#x5C5E;&#x6027;&#x9009;&#x62E9;&#x7B26;&#x3001;&#x5C5E;&#x6027;&#x503C;&#x4F7F;&#x7528;&#x53CC;&#x5F15;&#x53F7;&#x3002; &#x53C2;&#x8003; <a href="https://stackoverflow.com/questions/2168855/is-quoting-the-value-of-url-really-necessary" title="Is quoting the value of url() really necessary?" target="_blank">Is quoting the value of url() really necessary?</a></p>
<pre><code>/* Not recommended */
@import url(//www.google.com/css/maia.css);

html {
  font-family: &apos;open sans&apos;, arial, sans-serif;
}

/* Recommended */
@import url(&quot;//www.google.com/css/maia.css&quot;);

html {
  font-family: &quot;open sans&quot;, arial, sans-serif;
}

.selector[type=&quot;text&quot;] {

}
</code></pre><p><strong>&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#xFF08;Media query&#xFF09;&#x7684;&#x4F4D;&#x7F6E;</strong></p>
<p>&#x5C06;&#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#x653E;&#x5728;&#x5C3D;&#x53EF;&#x80FD;&#x76F8;&#x5173;&#x89C4;&#x5219;&#x7684;&#x9644;&#x8FD1;&#x3002;&#x4E0D;&#x8981;&#x5C06;&#x4ED6;&#x4EEC;&#x6253;&#x5305;&#x653E;&#x5728;&#x4E00;&#x4E2A;&#x5355;&#x4E00;&#x6837;&#x5F0F;&#x6587;&#x4EF6;&#x4E2D;&#x6216;&#x8005;&#x653E;&#x5728;&#x6587;&#x6863;&#x5E95;&#x90E8;&#x3002;&#x5982;&#x679C;&#x4F60;&#x628A;&#x4ED6;&#x4EEC;&#x5206;&#x5F00;&#x4E86;&#xFF0C;&#x5C06;&#x6765;&#x53EA;&#x4F1A;&#x88AB;&#x5927;&#x5BB6;&#x9057;&#x5FD8;&#x3002;</p>
<pre><code>.element { ... }
.element-avatar { ... }
.element-selected { ... }

@media (max-width: 768px) {
  .element { ...}
  .element-avatar { ... }
  .element-selected { ... }
}
</code></pre><p><strong>&#x4E0D;&#x8981;&#x4F7F;&#x7528; @import</strong></p>
<p>&#x4E0E; &lt;link&gt; &#x76F8;&#x6BD4;&#xFF0C;@import &#x8981;&#x6162;&#x5F88;&#x591A;&#xFF0C;&#x4E0D;&#x5149;&#x589E;&#x52A0;&#x989D;&#x5916;&#x7684;&#x8BF7;&#x6C42;&#x6570;&#xFF0C;&#x8FD8;&#x4F1A;&#x5BFC;&#x81F4;&#x4E0D;&#x53EF;&#x9884;&#x6599;&#x7684;&#x95EE;&#x9898;&#x3002;</p>
<p>&#x66FF;&#x4EE3;&#x529E;&#x6CD5;&#xFF1A;</p>
<ul>
<li>&#x4F7F;&#x7528;&#x591A;&#x4E2A; &#x5143;&#x7D20;&#xFF1B;</li>
<li>&#x901A;&#x8FC7; Sass &#x6216; Less &#x7C7B;&#x4F3C;&#x7684; CSS &#x9884;&#x5904;&#x7406;&#x5668;&#x5C06;&#x591A;&#x4E2A; CSS &#x6587;&#x4EF6;&#x7F16;&#x8BD1;&#x4E3A;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#xFF1B;</li>
<li>&#x5176;&#x4ED6; CSS &#x6587;&#x4EF6;&#x5408;&#x5E76;&#x5DE5;&#x5177;&#xFF1B;</li>
</ul>
<p>&#x53C2;&#x8003; <a href="http://www.stevesouders.com/blog/2009/04/09/dont-use-import/" title="don&#x2019;t use @import" target="_blank">don&#x2019;t use @import</a>&#xFF1B;</p>
<p><strong>&#x94FE;&#x63A5;&#x7684;&#x6837;&#x5F0F;&#x987A;&#x5E8F;&#xFF1A;</strong></p>
<font color="#c7254e" \="">a:link -&gt; a:visited -&gt; a:hover -&gt; a:active&#xFF08;LoVeHAte&#xFF09;</font>

<p><strong>&#x65E0;&#x9700;&#x6DFB;&#x52A0;&#x6D4F;&#x89C8;&#x5668;&#x5382;&#x5546;&#x524D;&#x7F00;</strong></p>
<p>&#x4F7F;&#x7528; <a href="https://github.com/postcss/autoprefixer" title="Autoprefixer" target="_blank">Autoprefixer</a> &#x81EA;&#x52A8;&#x6DFB;&#x52A0;&#x6D4F;&#x89C8;&#x5668;&#x5382;&#x5546;&#x524D;&#x7F00;&#xFF0C;&#x7F16;&#x5199; CSS &#x65F6;&#x4E0D;&#x9700;&#x8981;&#x6DFB;&#x52A0;&#x6D4F;&#x89C8;&#x5668;&#x524D;&#x7F00;&#xFF0C;&#x76F4;&#x63A5;&#x4F7F;&#x7528;&#x6807;&#x51C6;&#x7684; CSS &#x7F16;&#x5199;&#x3002;</p>
<p>Autoprefixer &#x901A;&#x8FC7; <a href="http://caniuse.com/" title="Can I use" target="_blank">Can I use</a>&#xFF0C;&#x6309;&#x517C;&#x5BB9;&#x7684;&#x8981;&#x6C42;&#xFF0C;&#x5BF9;&#x76F8;&#x5E94;&#x7684; CSS &#x4EE3;&#x7801;&#x6DFB;&#x52A0;&#x6D4F;&#x89C8;&#x5668;&#x5382;&#x5546;&#x524D;&#x7F00;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="CSS.html" class="navigation navigation-prev " aria-label="Previous page: 3. CSS">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="字体排印.html" class="navigation navigation-next " aria-label="Next page: 3.2 字体排印">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"3.1 通用约定","level":"1.4.1","depth":2,"next":{"title":"3.2 字体排印","level":"1.4.2","depth":2,"path":"css/字体排印.md","ref":"css/字体排印.md","articles":[]},"previous":{"title":"3. CSS","level":"1.4","depth":1,"path":"css/CSS.md","ref":"css/CSS.md","articles":[{"title":"3.1 通用约定","level":"1.4.1","depth":2,"path":"css/通用约定.md","ref":"css/通用约定.md","articles":[]},{"title":"3.2 字体排印","level":"1.4.2","depth":2,"path":"css/字体排印.md","ref":"css/字体排印.md","articles":[]},{"title":"3.3 模块组织","level":"1.4.3","depth":2,"path":"css/模块组织.md","ref":"css/模块组织.md","articles":[]},{"title":"3.4 Less规范","level":"1.4.4","depth":2,"path":"css/Less规范.md","ref":"css/Less规范.md","articles":[]},{"title":"3.5 性能优化","level":"1.4.5","depth":2,"path":"css/性能优化.md","ref":"css/性能优化.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"css/通用约定.md","mtime":"2019-05-16T08:56:19.008Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-17T02:26:20.307Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

